import request from '@/utils/request'

// 查询列表
export function findAllTypes(query) {
    return request({
        url: '/api/types/list',
        method: 'post',
        data: query
    })
}
// 查询详情
export function getTypes(id) {
    return request({
        url: '/api/types/' + id,
        method: 'get'
    })
}

// 新增
export function addTypes(data) {
    return request({
        url: '/api/types/',
        method: 'post',
        data: data
    })
}

// 修改
export function updateTypes(id,data) {
    return request({
        url: '/api/types/update/'+id,
        method: 'put',
        data: data
    })
}

// 删除
export function delTypes(id) {
    return request({
        url: '/api/types/' + id,
        method: 'DELETE'
    })
}

// 查询所有
export function findAllTypesList() {
    return request({
        url: '/api/types/all',
        method: 'get',
    })
}